set(SCITE_SOURCES
	./src/Exporters.cxx
	./src/Extender.h
	./src/FilePath.cxx
	./src/FilePath.h
	./src/IFaceTable.cxx
	./src/IFaceTable.h
	./src/JobQueue.cxx
	./src/JobQueue.h
	./src/LuaExtension.cxx
	./src/LuaExtension.h
	./src/MultiplexExtension.cxx
	./src/MultiplexExtension.h
	./src/Mutex.h
	./src/PropSetFile.cxx
	./src/PropSetFile.h
	./src/SciTE.h
	./src/SciTEBase.cxx
	./src/SciTEBase.h
	./src/SciTEBuffers.cxx
	./src/SciTEIO.cxx
	./src/SciTEKeys.h
	./src/SciTEProps.cxx
	./src/StringList.cxx
	./src/StringList.h
	./src/Utf8_16.cxx
	./src/Utf8_16.h
)

include_directories(../lua/src)
include_directories(../scintilla/include)
include_directories(./src)


if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
	include_directories(./win32)
	include_directories(../scintilla/win32)
	set(SCITE_SOURCES
		${SCITE_SOURCES}
		./win32/DirectorExtension.cxx
		./win32/DirectorExtension.h
		./win32/SciTEWin.cxx
		./win32/SciTEWin.h
		./win32/SciTEWinBar.cxx
		./win32/SciTEWinDlg.cxx
		./win32/SingleThreadExtension.cxx
		./win32/SingleThreadExtension.h
		./win32/UniqueInstance.cxx
		./win32/UniqueInstance.h
		./win32/WinMutex.cxx
		./win32/SciTERes.rc
	)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")


if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
	include_directories(./gtk)
	include_directories(../scintilla/gtk)
	set(SCITE_SOURCES
		${SCITE_SOURCES}
		./gtk/DirectorExtension.cxx
		./gtk/DirectorExtension.h
		./gtk/GTKMutex.cxx
		./gtk/pixmapsGNOME.h
		./gtk/SciIcon.h
		./gtk/SciTEGTK.cxx
	)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")



if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	include_directories(./macosx)
	set(SCITE_SOURCES
		${SCITE_SOURCES}
	)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")


#add_library( scite STATIC ${SCITE_SOURCES}	)
add_executable( scite WIN32 MACOSX_BUNDLE ${SCITE_SOURCES}	)
target_link_libraries(scite scintilla liblua)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
	target_link_libraries(scite imm32 comctl32)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")